package com.zhiyou.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.mapper.ProductMapper;
import com.zhiyou.pojo.Product;
import com.zhiyou.pojo.Report;
import com.zhiyou.pojo.Type;
import com.zhiyou.service.ProductServcie;

@Service
public class ProductServiceImpl implements ProductServcie {

	@Autowired
	ProductMapper productMapper;

	public List<Type> findTypes() {

		return productMapper.findTypes();
	}

	public void addPerson(Product product) {
		productMapper.addPerson(product);

	}

	public Product findProduct(int userId) {
		return productMapper.findProduct(userId);
	}

	public void updateProductBasic(Product product) {
		productMapper.updateProductBasic(product);
	}

	public void updateProductInfo(Product product) {
		productMapper.updateProductInfo(product);
	}

	public void updateProductDetail(Product product) {
		productMapper.updateProductDetail(product);
	}

	public void updateProductRepay(Report report) {
		productMapper.updateProductRepay(report);
		
	}

	public void addProductRepay(Report report) {
		productMapper.addProductRepay(report);
	}

	public Report findReport(int productId) {
		return productMapper.findReport(productId);
	}

	public void updateProductStats(int userId) {
		productMapper.updateProductStats(userId);
		
	}

	

}
